<template>
  <!-- modal -->
  <div class="modal" v-show="ModalEwma.isModal">
    <div class="modal-fiter"></div>
    <div class="modal-content">
      <div class="modal-center" @click="hide">
        <transition name="van-fade">
          <div class="ModalEwma" v-show="ModalEwma.isModal" @click="settingEvent">
            <img
               v-lazy="{src: ModalEwma.imgUrl, error: defaultImg(1), loading: defaultImg(1)}"
              alt
            />
            <div>长按二维码保存到本地相册</div>
          </div>
        </transition>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import {Lazyload } from 'vant'
Vue.use(Lazyload);
import mixin from "@/utils/mixin";
export default {
  name: "ModalEwma",
  props: ["ModalEwma"],
  mixins: [mixin],
  data() {
    return {
      show: {}
    };
  },
  mounted() {
    //console.log(this.ModalEwma);
  },
  methods: {
    hide: function() {
      this.ModalEwma.isModal = false;
      this.$emit("update:ModalEwma", this.ModalEwma);
    },
    ModalEwmaClick() {
      this.$emit("ModalEwmaClick", this.ModalEwma);
      this.hide();
    },
    settingEvent(event) {
      event.stopPropagation(); //此区域不受上面方法的影响
    }
  }
};
</script>
<style lang="scss" scoped>
.ModalEwma {
  width: 600px;
  height: 657px;
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  text-align: center;
  img {
    margin-top: 64px;
    width: 452px;
    height: 452px;
    margin-bottom: 40px;
  }
  div {
    font-size: 32px;
    font-family: PingFangSC-Regular;
    font-weight: bold;
    color: rgba(255, 37, 37, 1);
  }
}
</style>